package com.mx.tool.enums;

/**
 * @Author: 徐建鹏.
 * @create: 2021-11-11 13:25
 * @Description:
 */
public enum EncryptionEnum {
    AES("AES"),
    DES("DES"),
    RC4("RC4");

    private final String value;

    EncryptionEnum(String value) {
        this.value = value;
    }

    public static EncryptionEnum valueTo(String value) {
        switch (value) {
            case "AES":
                return AES;
            case "DES":
                return DES;
            case "RC4":
                return RC4;
            default:
                return null;
        }
    }

    public String value() {
        return this.value;
    }
}
